Class: BigNumber
Implements
Hexable
Constructors
constructor
• new BigNumber(constructorGuard
, hex
)
Parameters
Name | Type |
---|---|
constructorGuard | any |
hex | string |
Properties
_hex
• Readonly
_hex: string
_isBigNumber
• Readonly
_isBigNumber: boolean
Methods
abs
▸ abs(): BigNumber
Returns
add
▸ add(other
): BigNumber
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
and
▸ and(other
): BigNumber
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
div
▸ div(other
): BigNumber
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
eq
▸ eq(other
): boolean
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
boolean
fromTwos
▸ fromTwos(value
): BigNumber
Parameters
Name | Type |
---|---|
value | number |
Returns
gt
▸ gt(other
): boolean
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
boolean
gte
▸ gte(other
): boolean
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
boolean
isNegative
▸ isNegative(): boolean
Returns
boolean
isZero
▸ isZero(): boolean
Returns
boolean
lt
▸ lt(other
): boolean
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
boolean
lte
▸ lte(other
): boolean
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
boolean
mask
▸ mask(value
): BigNumber
Parameters
Name | Type |
---|---|
value | number |
Returns
mod
▸ mod(other
): BigNumber
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
mul
▸ mul(other
): BigNumber
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
or
▸ or(other
): BigNumber
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
pow
▸ pow(other
): BigNumber
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
shl
▸ shl(value
): BigNumber
Parameters
Name | Type |
---|---|
value | number |
Returns
shr
▸ shr(value
): BigNumber
Parameters
Name | Type |
---|---|
value | number |
Returns
sub
▸ sub(other
): BigNumber
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
toBigInt
▸ toBigInt(): bigint
Returns
bigint
toHexString
▸ toHexString(): string
Returns
string
Implementation of
Hexable.toHexString
toJSON
▸ toJSON(key?
): any
Parameters
Name | Type |
---|---|
key? | string |
Returns
any
toNumber
▸ toNumber(): number
Returns
number
toString
▸ toString(): string
Returns
string
toTwos
▸ toTwos(value
): BigNumber
Parameters
Name | Type |
---|---|
value | number |
Returns
xor
▸ xor(other
): BigNumber
Parameters
Name | Type |
---|---|
other | BigNumberish |
Returns
from
▸ Static
from(value
): BigNumber
Parameters
Name | Type |
---|---|
value | any |
Returns
isBigNumber
▸ Static
isBigNumber(value
): value is BigNumber
Parameters
Name | Type |
---|---|
value | any |
Returns
value is BigNumber